This document provides code for importing and cleaning data from the
systematic review that was used to create all figures provided in the
submitted manuscript.
Figure 1 - Printing Methods
Figure 1b - What forms are printed with the ink?
# Data cleaning
# Those with a semicolon response ; should now be called "combo"
# responses separate with a pipe should be merged when they are saying the same thing.
printer_forms <- reconciled %>%
mutate(`4.1.4 What kind of forms are printed with this ink?_01d3ca37-1e2f-4087-8f39-c183f98f0c4e_Answer`= recode(`4.1.4 What kind of forms are printed with this ink?_01d3ca37-1e2f-4087-8f39-c183f98f0c4e_Answer`, "Grid|Grid" = "Grid")) %>%
mutate(`4.1.4 What kind of forms are printed with this ink?_01d3ca37-1e2f-4087-8f39-c183f98f0c4e_Answer`= recode(`4.1.4 What kind of forms are printed with this ink?_01d3ca37-1e2f-4087-8f39-c183f98f0c4e_Answer`, "lobular liver|lobular liver" = "lobular liver")) %>%
mutate(`4.1.4 What kind of forms are printed with this ink?_01d3ca37-1e2f-4087-8f39-c183f98f0c4e_Answer`= recode(`4.1.4 What kind of forms are printed with this ink?_01d3ca37-1e2f-4087-8f39-c183f98f0c4e_Answer`, "Other|Other" = "Other")) %>%
mutate(`4.1.4 What kind of forms are printed with this ink?_01d3ca37-1e2f-4087-8f39-c183f98f0c4e_Answer`= recode(`4.1.4 What kind of forms are printed with this ink?_01d3ca37-1e2f-4087-8f39-c183f98f0c4e_Answer`, "Grid;Other" = "Combination")) %>%
mutate(`4.1.4 What kind of forms are printed with this ink?_01d3ca37-1e2f-4087-8f39-c183f98f0c4e_Answer`= recode(`4.1.4 What kind of forms are printed with this ink?_01d3ca37-1e2f-4087-8f39-c183f98f0c4e_Answer`, "lobular liver;Other" = "Combination"))
printer_forms <- printer_forms %>%
mutate(`4.1.4 What kind of forms are printed with this ink?_01d3ca37-1e2f-4087-8f39-c183f98f0c4e_Answer`= recode(`4.1.4 What kind of forms are printed with this ink?_01d3ca37-1e2f-4087-8f39-c183f98f0c4e_Answer`, "lobular liver" = "Lobular Liver"))
t4 <-table(printer_forms$`4.1.4 What kind of forms are printed with this ink?_01d3ca37-1e2f-4087-8f39-c183f98f0c4e_Answer`)
t4_sorted<- t4 %>% as.data.frame() %>% arrange(factor(Var1, levels = c("Grid", "Lobular Liver", "Toroids", "Combination", "Other")))
data_bar4 <- t4_sorted$Freq
names(data_bar4) <- t4_sorted$Var1
text(x = barplot(
# colnames<-(t(t13_sorted[-1]), t13_sorted[,1]),
# 'labels' <- (t(t13_sorted[-1]), t13_sorted[,1])),
# t(as.matrix(t13_sorted)),
data_bar4,
ylab = "Number of Studies", ylim=c(0, max(data_bar4) + 10), cex.names=1 , col = "#fb9a99"
#, main = "What kind of forms are printed with this ink?"
), y = data_bar4 + 2, labels = data_bar4,
cex = 1)

# text(x = barplot(t4, ylab = "Number of studies", ylim=c(0, max(t4) + 10), cex.names=.8 , col = "green", main = "What kind of forms are printed with this ink?"), y = t4 + 2, labels = t4, cex = 0.8)
change order to: ” Grid - Lobular Liver - Toroids - Combination -
Other” - done ABB
Figure 1c - Which printing methods are used which which bioink?
Interactive sankey diagram - hover over each section to see the
number of experiments in each category.
library(plotly)
##
## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2':
##
## last_plot
## The following object is masked from 'package:stats':
##
## filter
## The following object is masked from 'package:graphics':
##
## layout
#### prep data for sankey diagram
# type -->
Print_bioink <- reconciled %>%select(
study_ID,
`4.1 What kind of printing method is used?_ae684e28-4f90-44ad-9de2-731d076de0b0_Answer`,
`4.1.3 What type of bioink was used?_92421414-c597-4e9c-b720-9bb4318b5483_Answer`,
`4.1.3.1.1 If natural bioink, please choose the type._66b761ad-6630-4323-b423-c848a717aae4_Answer`,
`4.1.3.1.4Â If Synthetic bioink: choose the type _e74ea0e0-a654-4ae2-b59e-2e0b14a4651a_Answer`,
`4.1.3.1.2Â If Protein based: choose the type._621671b3-9f7e-4a22-80ac-14b02fdd0683_Answer`,
`4.1.3.1.3 If Polysaccharides Based: choose the type. _fcea8bcb-da6c-4154-aa44-8ff4734fa4fe_Answer`
)
Print_bioink_re <- Print_bioink %>% rename(
print_method = `4.1 What kind of printing method is used?_ae684e28-4f90-44ad-9de2-731d076de0b0_Answer`,
typeGeneral_level1 = `4.1.3 What type of bioink was used?_92421414-c597-4e9c-b720-9bb4318b5483_Answer`,
typeNatural_level2 = `4.1.3.1.1 If natural bioink, please choose the type._66b761ad-6630-4323-b423-c848a717aae4_Answer`,
typeSynthetic_level2 = `4.1.3.1.4Â If Synthetic bioink: choose the type _e74ea0e0-a654-4ae2-b59e-2e0b14a4651a_Answer`,
typeProtein_level3 = `4.1.3.1.2Â If Protein based: choose the type._621671b3-9f7e-4a22-80ac-14b02fdd0683_Answer`,
typePoly_level3 = `4.1.3.1.3 If Polysaccharides Based: choose the type. _fcea8bcb-da6c-4154-aa44-8ff4734fa4fe_Answer`
)
#### needs to be 72 rows only!! - MH will supply which combo bioInk to Printer is correct from original study
# 487b3d85-d671-40f2-8d60-309a6aa9a4f3
# Print_bioink_re <- within(Print_bioink_re, print_method[print_method == "Extrusion based|Stereolithography" & study_ID == '487b3d85-d671-40f2-8d60-309a6aa9a4f3'] <- 'John Smith1')
Print_bioink_re$print_method <- as.character(Print_bioink_re$print_method)
Print_bioink_re <- Print_bioink_re %>% mutate(print_method = ifelse(study_ID == '487b3d85-d671-40f2-8d60-309a6aa9a4f3', "Extrusion based", print_method))
# Print_bioink_re[11, "print_method"] <- "Extrusion based"
Print_bioink1_1 <- Print_bioink_re %>%
separate_rows(print_method , sep="\\|")
Print_bioink1_2 <- Print_bioink_re %>%
separate_rows(typeGeneral_level1, sep="\\|")
Print_bioink1_2$print_method <- as.factor(Print_bioink1_2$print_method)
Print_bioink1_2$typeGeneral_level1 <- as.factor(Print_bioink1_2$typeGeneral_level1 )
# 487b3d85-d671-40f2-8d60-309a6aa9a4f3
# extrusion was
# sterolithography
# summary(Print_bioink1)
Print_bioink1_sankey <- Print_bioink1_2 %>% select(study_ID, print_method, typeGeneral_level1)
Print_bioink1_sankey
## # A tibble: 72 × 3
## study_ID print_method typeGeneral_level1
## <chr> <fct> <fct>
## 1 0b78f899-524b-49df-8b02-bdb64e281ed4 Inject based Natural
## 2 f0faaae5-eba2-4213-afe0-d958d5279121 Extrusion based Natural
## 3 f0faaae5-eba2-4213-afe0-d958d5279121 Extrusion based Synthetic
## 4 487b3d85-d671-40f2-8d60-309a6aa9a4f3 Extrusion based Natural
## 5 487b3d85-d671-40f2-8d60-309a6aa9a4f3 Extrusion based Synthetic
## 6 d21360df-70ad-426a-b86e-b6eccebcbe11 Extrusion based Natural
## 7 11abf440-c03a-4830-9c5d-4e3688fe8808 Other Natural
## 8 6955f074-b9f4-4f46-b6a8-06b49f150239 Inject based Unclear
## 9 13e55d40-f8a1-43bd-98ca-32db20c905cd Other Natural
## 10 2a8a7137-e063-43ca-aeaa-f6b69913cfd4 Extrusion based Synthetic
## # ℹ 62 more rows
# create a table of frequencies
freq_table <- Print_bioink1_sankey %>% group_by(print_method, typeGeneral_level1) %>%
summarise(n = n())
## `summarise()` has grouped output by 'print_method'. You can override using the
## `.groups` argument.
freq_table <- freq_table %>%
mutate(print_method= recode(print_method, "Extrusion based" = "Extrusion")) %>%
mutate(print_method= recode(print_method, "Unclear" = "Unclear - Method")) %>%
mutate(print_method= recode(print_method, "Inject based" = "Injection")) %>%
mutate(typeGeneral_level1= recode(typeGeneral_level1, "Unclear" = "Unclear - Bioink"))
# create a nodes data frame
nodes <- data.frame(name = unique(c(as.character(freq_table$print_method),
as.character(freq_table$typeGeneral_level1))))
# create links dataframe
links <- data.frame(source = match(freq_table$print_method, nodes$name) - 1,
target = match(freq_table$typeGeneral_level1, nodes$name) - 1,
value = freq_table$n,
stringsAsFactors = FALSE)
# Make Sankey diagram
plot_ly(
type = "sankey",
orientation = "h",
node = list(pad = 15,
thickness = 20,
line = list(color = "black", width = 0.5),
label = nodes$name),
link = list(source = links$source,
target = links$target,
value = links$value),
textfont = list(size = 18, color = "black"),
width = 820,
height = 580
) %>%
layout(
#title = "Sankey Diagram: Print Method & Ink Type",
font = list(size = 18),
margin = list(t = 40, l = 10, r = 10, b = 10))
Figure 1d - What “Other” printed forms are used?
library(stringr)
print_form_comment_other <- tibble(
study_ID = reconciled$study_ID,
method = reconciled$`4.1.4 What kind of forms are printed with this ink?_01d3ca37-1e2f-4087-8f39-c183f98f0c4e_Answer`,
comment = reconciled$`4.1.4 What kind of forms are printed with this ink?_01d3ca37-1e2f-4087-8f39-c183f98f0c4e_Comments`)
print_form_comment_other <- print_form_comment_other %>%
separate_rows(method, sep="\\|") %>%
subset(method == "Other")
print_form_comment_other <- print_form_comment_other %>%
separate_rows(comment, sep="\\|")
# remove line breaks
print_form_comment_other$comment <- str_replace_all(print_form_comment_other$comment, "[\n]" , "")
# remove whitespace from start of str
print_form_comment_other$comment <- str_trim(print_form_comment_other$comment, "left")
# remove whitespace from end of str
print_form_comment_other$comment <- str_trim(print_form_comment_other$comment, "right")
# turn variable into a factor to group similar
#print_form_comment_other$comment <- as.factor(print_form_comment_other$comment)
table(print_form_comment_other$comment)
##
## Complex, perfusable architectures cruciform
## 1 1
## donut doplets
## 4 1
## droplets gear shape
## 8 1
## hexagonal hexagonal constructs
## 1 1
## honeycomb lines
## 1 3
## not clear printed on a chip
## 1 5
## printing on a chip rectangle
## 1 1
## sinusoidal spheroid
## 1 1
## spheroids square
## 2 1
## two-compartment planar geometry
## 7
# is.data.frame(print_form_comment_other)
# rename answers to more easily group them
print_form_comment_other <- print_form_comment_other %>%
mutate(comment = recode(comment, "doplets" = "droplets")) %>%
mutate(comment = recode(comment, "printing on a chip" = "printed on a chip")) %>%
mutate(comment = recode(comment, "spheroid" = "spheroids")) %>%
mutate(comment = recode(comment, "hexagonal constructs" = "hexagonal"))%>%
mutate(comment = recode(comment, "not clear" = "unclear"))
# group by numbers
commentsPrintForm <- print_form_comment_other %>% group_by(comment) %>% summarise(n_unique = length(unique(study_ID))) %>% arrange(desc(n_unique))
names(commentsPrintForm) <- c("Printed Form", "Number of Unique Studies")
#install.packages("formattable")
library(formattable)
##
## Attaching package: 'formattable'
## The following object is masked from 'package:plotly':
##
## style
formattable(commentsPrintForm,
align =c("l", "r"),
list(`Indicator Name` = formatter(
"span",
style = ~ style(color = "grey",font.weight = "bold", font.size = "16px")),
# `Number of Unique Studies`= formatter(style = ~ style( font.weight = "bold")),
`Number of Unique Studies`= color_bar("#fb9a99"),
table.attr = 'style="font-size: 16px;";\"'
))
|
Printed Form
|
Number of Unique Studies
|
|
droplets
|
6
|
|
two-compartment planar geometry
|
4
|
|
printed on a chip
|
3
|
|
spheroids
|
3
|
|
hexagonal
|
2
|
|
lines
|
2
|
|
Complex, perfusable architectures
|
1
|
|
cruciform
|
1
|
|
donut
|
1
|
|
gear shape
|
1
|
|
honeycomb
|
1
|
|
rectangle
|
1
|
|
sinusoidal
|
1
|
|
square
|
1
|
|
unclear
|
1
|
CHange “not clear” to “unclear” - done ABB
Figure 2 - BioInks
Figure 2a - What bioinks were used?
Interactive Sunburst plot - hover over each section to see the number
of experiments in each category.
#### BIOINK sunburst
library(dplyr)
# type -->
bioink <- reconciled %>% select(
study_ID,
`4.1.3 What type of bioink was used?_92421414-c597-4e9c-b720-9bb4318b5483_Answer`,
`4.1.3.1.1 If natural bioink, please choose the type._66b761ad-6630-4323-b423-c848a717aae4_Answer`,
`4.1.3.1.4Â If Synthetic bioink: choose the type _e74ea0e0-a654-4ae2-b59e-2e0b14a4651a_Answer`,
`4.1.3.1.2Â If Protein based: choose the type._621671b3-9f7e-4a22-80ac-14b02fdd0683_Answer`,
`4.1.3.1.3 If Polysaccharides Based: choose the type. _fcea8bcb-da6c-4154-aa44-8ff4734fa4fe_Answer`
)
# reconciled$`4.1.3.1.4Â If Synthetic bioink: choose the type _e74ea0e0-a654-4ae2-b59e-2e0b14a4651a_Answer`
bioink <- bioink %>% rename(typeGeneral_level1 = `4.1.3 What type of bioink was used?_92421414-c597-4e9c-b720-9bb4318b5483_Answer`,
typeNatural_level2 = `4.1.3.1.1 If natural bioink, please choose the type._66b761ad-6630-4323-b423-c848a717aae4_Answer`,
typeSynthetic_level2 = `4.1.3.1.4Â If Synthetic bioink: choose the type _e74ea0e0-a654-4ae2-b59e-2e0b14a4651a_Answer`,
typeProtein_level3 = `4.1.3.1.2Â If Protein based: choose the type._621671b3-9f7e-4a22-80ac-14b02fdd0683_Answer`,
typePoly_level3 = `4.1.3.1.3 If Polysaccharides Based: choose the type. _fcea8bcb-da6c-4154-aa44-8ff4734fa4fe_Answer`
)
### other is Matrigel
#################### update after discussion with experts on interpretation
bioink_split1 <- separate_rows(bioink, typeGeneral_level1 , sep="\\|")
### fill in NAs
# turn all cols to character
bioInk_72 <- bioink_split1 %>%
mutate(across(everything(), as.character))
bioInk_72 <- bioink_split1 %>%
mutate(
typeNatural_level2 = replace(typeNatural_level2, typeGeneral_level1!="Natural", NA),
typeSynthetic_level2 = replace(typeSynthetic_level2, typeGeneral_level1!="Synthetic", NA),
typeProtein_level3 = replace(typeProtein_level3, typeGeneral_level1!="Natural", NA),
typePoly_level3 = replace(typePoly_level3, typeGeneral_level1!="Natural", NA),
#typePoly_level3 = replace(typePoly_level3, typeNatural_level2!="Polysaccharide based", NA),
#typeProtein_level3 = replace(typeProtein_level3, typeNatural_level2!="Protein based", NA),
# typePoly_level3 = replace(typePoly_level3, typeGeneral_level1!="Natural", NA)
)
##### level 2
bioInk_72$level2 <- apply(bioInk_72[, c("typeNatural_level2", "typeSynthetic_level2")], 1,
function(i){ paste(na.omit(i), collapse = " ") })
##### level 3
bioInk_72$level3 <- apply(bioInk_72[, c("typeProtein_level3", "typePoly_level3")], 1,
function(i){ paste(na.omit(i), collapse = " ") })
#### rename the columns
# rename answers to more easily group them
bioInk_73 <- bioInk_72 %>%
mutate(level3 = recode(level3, "Collagens" = "Collagen")) %>%
mutate(level3 = recode(level3, "Collagens;Gelatin" = "Collagen+Gelatin")) %>%
mutate(level3 = recode(level3, "Collagens|Collagens" = "Collagen")) %>%
mutate(level3 = recode(level3, "Gelatin|Gelatin" = "Gelatin")) %>%
mutate(level3 = recode(level3, "Gelatin;Silk-fibroin" = "Gelatin+Silk-fibroin")) %>%
mutate(level3 = recode(level3, "Gelatin;Fibrinogen" = "Gelatin+Fibrinogen")) %>%
mutate(level3 = recode(level3, "Collagens;Gelatin Alginates" = "Collagen+Gelatin+Alginates")) %>%
mutate(level3 = recode(level3, "Alginates;Other" = "Alginates+Other")) %>%
mutate(level3 = recode(level3, "Gelatin Alginates" = "Gelatin+Alginates")) %>%
mutate(level3 = recode(level3, "Collagens Alginates" = "Collagen+Alginates")) %>%
mutate(level3 = recode(level3, "Fibrinogen Alginates" = "Fibrinogen+Alginates")) %>%
mutate(level3 = recode(level3, "Gelatin Alginates;Other" = "Gelatin+Alginates+Other")) %>%
mutate(level3 = recode(level3, "Fibrinogen;Other Alginates;Other" = "Fibrinogen+Alginates+Other")) %>%
mutate(level3 = recode(level3, "Collagens|Collagens Hyaluronic acid|Hyaluronic acid" = "Collagen+Hyaluronic acid")) %>%
mutate(level3 = recode(level3, "Gelatin;Other Alginates" = "Gelatin+Alginates+Other")) %>%
mutate(level3 = recode(level3, "Gelatin;Other Alginates;Other" = "Gelatin+Alginates+Other")) %>%
mutate(level3 = recode(level3, "Gelatin Chitosan" = "Gelatin+Chitosan")) %>%
mutate(level3 = recode(level3, "Gelatin Hyaluronic acid" = "Gelatin+Hyaluronic acid")) %>%
mutate(level2 = recode(level2, "Poly ethylene glycol (PEG)" = "PEG")) %>%
mutate(level2 = recode(level2, "Protein based" = "Protein")) %>%
mutate(level2 = recode(level2, "Polysaccharide based" = "Poly")) %>%
mutate(level2 = recode(level2, "dECM based" = "dECM")) %>%
mutate(level2 = recode(level2, "Protein based;Polysaccharide based" = "Protein+Poly")) %>%
mutate(level2 = recode(level2, "Protein based;dECM based" = "Protein+dECM")) %>%
mutate(level2 = recode(level2, "Polysaccharide based;dECM based" = "Poly+dECM")) %>%
mutate(level2 = recode(level2, "Protein based;Polysaccharide based;Other" = "Protein+Poly+MatriGel")) %>%
mutate(level2 = recode(level2, "Protein based;Polysaccharide based;dECM based" = "Protein+Poly+dECM")) %>%
mutate(level2 = recode(level2, "Protein based;Polysaccharide based|Protein based;Polysaccharide based" = "Protein+Poly")) %>%
mutate(level2 = recode(level2, "Protein based|Protein based" = "Protein")) %>%
mutate(typeGeneral_level1 = recode(typeGeneral_level1, "Not reported" = "NR")
)
# Protein based|dECM based
# which(bioInk_72$level2 == "Protein based|dECM based")
# bioInk_72[13, "level2"] <- "Protein based"
# bioInk_72[14, "level2"] <- "dECM based"
bioInk_73[30, "level2"] <- "Protein"
bioInk_73[31, "level2"] <- "dECM "
# other in "not reported" should be removed
#### START PLOTTING
library(dplyr)
library(plotme)
library(plotly)
library(palmerpenguins)
# Create the plots
fig_bioInk_simple <- bioInk_73 %>%
count(typeGeneral_level1, level2) %>%
plotme::count_to_sunburst()
# Update the colors
fig_bioInk_simple %>%
plotly::style(marker = list(colors = c("#a6611a","#dfc27d", "#80cdc1", "#018571")))
bioInk_count_suppl <- bioInk_73 %>% count(
typeGeneral_level1,
level2
, level3
#,study_ID
)%>%
plotme::count_to_sunburst()
bioInk_count_suppl %>%
plotly::style(marker = list(colors = c("#a6611a","#dfc27d", "#80cdc1", "#018571")))
# bioInk_count_simple <- count(bioInk_73,
# typeGeneral_level1,
# level2
# # , level3
# #,study_ID
# )
# # sunburst plot
# plotme::count_to_sunburst(bioInk_count_simple
#
# ,sort_by_n = TRUE
#
# # ,fill_by_n = TRUE
#
# )
# link to raw function code: https://github.com/yogevherz/plotme/blob/master/R/count_to_sunburst_treemap.R
# plotme::count_to_sunburst(bioInk_count_suppl
#
# ,sort_by_n = TRUE
#
# # ,fill_by_n = TRUE
# )
Figure 2b - Cell Densities
cellDensity_num <- tibble(
study_ID = reconciled$study_ID,
cellDensity = reconciled$`4.1.3.4.1 Please specify the cell density cells/ml!_a995234c-c94e-4d14-8a6c-fe5bd759b928_Answer`)
cellDensity_num <- separate_rows(cellDensity_num, cellDensity, sep="\\|")
cellDensity_num <- separate_rows(cellDensity_num, cellDensity, sep=";")
cellDensity_num <- separate_rows(cellDensity_num, cellDensity, sep=",")
# remove line breaks
cellDensity_num$cellDensity <- str_replace_all(cellDensity_num$cellDensity, "[\n]" , "")
# convert to e+ for scientific notation conversion
cellDensity_num$cellDensity <- str_replace_all(cellDensity_num$cellDensity, "\\*10E" , "e+")
# remove whitespace from start & end of str
cellDensity_num$cellDensity <- str_trim(cellDensity_num$cellDensity, "left")
cellDensity_num$cellDensity <- str_trim(cellDensity_num$cellDensity, "right")
# rename answers to more easily group them
# cellDensity_num <- cellDensity_num %>%
# mutate(cellDensity = recode(cellDensity, "1*10E6" = "microarray spotter")) %>% mutate(cellDensity = recode(cellDensity, "scaffold free bioprinting" = "scaffold-free bioprinting"))
options(scipen = 999)
# sorted <- cellDensity_num[order(as.numeric(as.character(cellDensity_num$cellDensity))), ]
freq_table_cell <- cellDensity_num %>% group_by(cellDensity) %>%
summarise(n = n())
t16 <- freq_table_cell[order(as.numeric(as.character(freq_table_cell$cellDensity))), ]
t16 <- table(freq_table_cell$cellDensity)
formattable(freq_table_cell)
|
cellDensity
|
n
|
|
0.5e+6
|
1
|
|
1.5e+6
|
4
|
|
1.5e+7
|
2
|
|
1.5e+8
|
1
|
|
10e+5
|
1
|
|
10e+7
|
1
|
|
1e+5
|
1
|
|
1e+6
|
7
|
|
1e+7
|
5
|
|
1e+8
|
1
|
|
2.5e+5
|
1
|
|
2.5e+6
|
3
|
|
2e+5
|
2
|
|
2e+6
|
7
|
|
3.5e+6
|
1
|
|
30e+6
|
1
|
|
3e+5
|
1
|
|
3e+6
|
4
|
|
3e+7
|
2
|
|
4.5e+6
|
1
|
|
4e+5
|
1
|
|
4e+6
|
1
|
|
4e+7
|
3
|
|
5.0e+6
|
1
|
|
5e+5
|
1
|
|
5e+6
|
4
|
|
5e+7
|
1
|
|
6.7e+6
|
1
|
|
6e+6
|
1
|
|
6e+7
|
1
|
|
7e+6
|
2
|
|
8e+6
|
1
|
|
NA
|
12
|
#
# formattable(t16,
# align =c("l", "r"),
# list(`Indicator Name` = formatter(
# "span",
# style = ~ style(color = "grey",font.weight = "bold")),
# # `Number of Unique Studies`= formatter(style = ~ style( font.weight = "bold")),
# `n`= color_bar("lightblue")
#
# ))
#t16
# text(x = barplot(t16$cellDensity, ylab = "Number of Inks", ylim=c(0, max(t16$n) + 10), cex.names=1 , col = "#b2df8a"
# # , main = "What is the Reported Cell Density"
# ), y = t16$n + 2, labels = t16$cellDensity, cex = 1)
# cellDensity_num$cellDensity <- as.numeric(cellDensity_num$cellDensity)
#
# hist <- hist(cellDensity_num$cellDensity, breaks = 500, plot = FALSE)
#
#
# plot(hist, freq = TRUE, labels = TRUE)
options(scipen = 0)
Figure 3 - Liver Cells
Figure 3a - What Type of Liver Cells are used?
### combine the ones with semi-colon - into a new category called "Combination"
liver_cells <- reconciled %>%
mutate(`2.2Â What is the main type of liver cells included?_9bea404f-a75c-401f-af5b-8fd020306538_Answer` = recode(`2.2Â What is the main type of liver cells included?_9bea404f-a75c-401f-af5b-8fd020306538_Answer`, "Hepatoma cells;Other" = "Combination")) %>%
mutate(`2.2Â What is the main type of liver cells included?_9bea404f-a75c-401f-af5b-8fd020306538_Answer` = recode(`2.2Â What is the main type of liver cells included?_9bea404f-a75c-401f-af5b-8fd020306538_Answer`, "Primary cells;Other" = "Combination")) %>%
mutate(`2.2Â What is the main type of liver cells included?_9bea404f-a75c-401f-af5b-8fd020306538_Answer` = recode(`2.2Â What is the main type of liver cells included?_9bea404f-a75c-401f-af5b-8fd020306538_Answer`, "primary cells" = "Primary cells"))%>%
mutate(`2.2Â What is the main type of liver cells included?_9bea404f-a75c-401f-af5b-8fd020306538_Answer` = recode(`2.2Â What is the main type of liver cells included?_9bea404f-a75c-401f-af5b-8fd020306538_Answer`, "Induced pluripotent stem cells" = "iPSCs"))
t9 <- table(liver_cells$`2.2Â What is the main type of liver cells included?_9bea404f-a75c-401f-af5b-8fd020306538_Answer`)
t9_sorted<- t9 %>% as.data.frame() %>% arrange(factor(Var1, levels = c("Hepatoma cells", "iPSCs", "Primary cells", "Combination", "Other")))
data_bar9 <- t9_sorted$Freq
names(data_bar9) <- t9_sorted$Var1
text(x = barplot(
# colnames<-(t(t13_sorted[-1]), t13_sorted[,1]),
# 'labels' <- (t(t13_sorted[-1]), t13_sorted[,1])),
# t(as.matrix(t13_sorted)),
data_bar9,
ylab = "Number of Studies", ylim=c(0, max(data_bar9) + 10), cex.names=1 , col = "#eed4f9",
# main = "What kind of forms are printed with this ink?"
),
y = data_bar9 + 2, labels = data_bar9,
cex = 1)

#barplot(table(reconciled$`2.2Â What is the main type of liver cells included?_9bea404f-a75c-401f-af5b-8fd020306538_Answer`), ylab = "Number of studies", cex.names=.5, col = "turquoise")
# text(x = barplot(t9, ylab = "Number of studies", ylim=c(0, max(t9) + 10), cex.names=.8 , col = "turquoise", main = "What type of Liver Cells are included?"), y = t9 + 2, labels = t9, cex = 0.8, )
Figure 3e - Additives
### Additives
# -- needs cleaning
# table(reconciled$`4.1.3.3 Which information is provided on the additives in the ink or culture? _4c2b5908-9c3c-4ba8-91f2-dd9771ac2ad4_Answer`)
# needs cleaning
liverAdditive <- tibble(
study_ID = reconciled$study_ID,
additive = reconciled$`4.1.3.3 Which information is provided on the additives in the ink or culture? _4c2b5908-9c3c-4ba8-91f2-dd9771ac2ad4_Answer`
)
liverAdditive <- separate_rows(liverAdditive, additive, sep="\\|")
liverAdditive <- separate_rows(liverAdditive, additive, sep=";")
# group by numbers
liverAdditive_count <- liverAdditive %>% group_by(additive) %>% summarise(n_studies_report = length(unique(study_ID))) %>% arrange(desc(n_studies_report))
names(liverAdditive_count) <- c("Liver Additive Type", "Number of Unique Studies")
library(formattable)
formattable(liverAdditive_count,
align =c("l", "r"),
list(`Indicator Name` = formatter(
"span", style = ~ style(color = "black",font.weight = "bold")),
"Number of Unique Studies"= color_bar("#eed4f9")
))
|
Liver Additive Type
|
Number of Unique Studies
|
|
Concentration
|
50
|
|
Manufacturer
|
42
|
|
None
|
13
|
|
Order number
|
10
|
#################################
####### How many items were reported?
additives_studies <- liverAdditive %>% group_by(study_ID) %>% summarise(n_items_reported = length(unique(additive))) %>% arrange(desc(n_items_reported))
# hist(custom_bioInk_studies$n_items_reported)
t12 <- table(additives_studies$n_items_reported)
#barplot(table(custom_bioInk_studies$n_items_reported), ylab = "Number of studies", cex.names=.7, col = "lightblue")
text(x = barplot(t12, ylab = "Number of studies", ylim=c(0, max(t12) + 10), cex.names=.8 , col = "turquoise", main = "How many items were reported about bioink or co-culture additives?"), y = t12 + 2, labels = t12, cex = 0.8)

###################################################
## 2.1.1.1 - if xeno free
additives <- tibble(
study_ID = reconciled$study_ID,
additive = reconciled$`2.1.1.1 If not xeno-free, which additives are included in the study?_39f4070b-a7cd-4b06-9618-47e07363219c_Answer`
)
additives <- separate_rows(additives, additive, sep="\\|")
additives <- separate_rows(additives, additive, sep=";")
# group by numbers
Additive_count <- additives %>% group_by(additive) %>% summarise(n_studies_report = length(unique(study_ID))) %>% arrange(desc(n_studies_report))
library(formattable)
formattable(Additive_count,
align =c("l", "r"),
list(`Indicator Name` = formatter(
"span", style = ~ style(color = "grey",font.weight = "bold")),
`n_studies_report`= color_bar("turquoise")
))
|
additive
|
n_studies_report
|
|
Fetal Bovine Serum (FBS)
|
37
|
|
Gelatin
|
27
|
|
NA
|
20
|
|
Other
|
12
|
|
Matrigel
|
9
|
|
Bovine Serum Albumin (BSA)
|
8
|
|
Collagen
|
8
|
|
Basement Membrane Extracts (BME)
|
1
|
#### 2.1.2 - Animal
additivesAnimal <- tibble(
study_ID = reconciled$study_ID,
additive = reconciled$`2.1.2 If animal, which of the following additives are included in the study?_bd00875c-4d61-4449-8629-6ff8fab20ec5_Answer`
)
additivesAnimal <- separate_rows(additivesAnimal, additive, sep="\\|")
additivesAnimal <- separate_rows(additivesAnimal, additive, sep=";")
# group by numbers
AdditiveAnimal_count <- additivesAnimal %>% group_by(additive) %>% summarise(n_studies_report = length(unique(study_ID))) %>% arrange(desc(n_studies_report))
library(formattable)
formattable(AdditiveAnimal_count,
align =c("l", "r"),
list(`Indicator Name` = formatter(
"span", style = ~ style(color = "grey",font.weight = "bold")),
`n_studies_report`= color_bar("turquoise")
))
|
additive
|
n_studies_report
|
|
NA
|
59
|
|
Fetal Bovine Serum (FBS)
|
3
|
|
Collagen
|
1
|
|
Gelatin
|
1
|
|
Not reported
|
1
|
|
Other
|
1
|
#### 2.1.3 - if both
additivesBoth <- tibble(
study_ID = reconciled$study_ID,
additive = reconciled$`2.1.3 If both, which of the following additives are included in the study?_648859a8-3da6-4d7e-b457-d3443a608681_Answer`
)
additivesBoth <- separate_rows(additivesBoth, additive, sep="\\|")
additivesBoth <- separate_rows(additivesBoth, additive, sep=";")
# group by numbers
AdditiveBoth_count <- additivesBoth %>% group_by(additive) %>% summarise(n_studies_report = length(unique(study_ID))) %>% arrange(desc(n_studies_report))
library(formattable)
formattable(AdditiveBoth_count,
align =c("l", "r"),
list(`Indicator Name` = formatter(
"span", style = ~ style(color = "grey",font.weight = "bold")),
`n_studies_report`= color_bar("turquoise")
))
|
additive
|
n_studies_report
|
|
NA
|
49
|
|
Fetal Bovine Serum (FBS)
|
14
|
|
Gelatin
|
5
|
|
Bovine Serum Albumin (BSA)
|
2
|
|
Collagen
|
2
|
|
Matrigel
|
1
|
|
Other
|
1
|
##### Combine animal, if not xeno-free and both
additivesCombo <- tibble(
study_ID = reconciled$study_ID,
additive_xeno = reconciled$`2.1.1.1 If not xeno-free, which additives are included in the study?_39f4070b-a7cd-4b06-9618-47e07363219c_Answer`,
additive_both = reconciled$`2.1.3 If both, which of the following additives are included in the study?_648859a8-3da6-4d7e-b457-d3443a608681_Answer`,
additive_animal = reconciled$`2.1.2 If animal, which of the following additives are included in the study?_bd00875c-4d61-4449-8629-6ff8fab20ec5_Answer`
)
additivesCombo <- separate_rows(additivesCombo, additive_xeno, sep="\\|")
additivesCombo <- separate_rows(additivesCombo, additive_xeno, sep=";")
additivesCombo <- separate_rows(additivesCombo, additive_both, sep="\\|")
additivesCombo <- separate_rows(additivesCombo, additive_both, sep=";")
additivesCombo <- separate_rows(additivesCombo, additive_animal, sep="\\|")
additivesCombo <- separate_rows(additivesCombo, additive_animal, sep=";")
### merge level 2 & merge level 3
# additivesCombo$additives_all <- ifelse(!is.na(additivesCombo$additive_animal), additivesCombo$additive_animal, additivesCombo$additive_both)
# additivesCombo$additives_all <- ifelse(!is.na(additivesCombo$additive_both), additivesCombo$additive_both, additivesCombo$additive_xeno)
additivesCombo <- additivesCombo %>% unite("additives_all", c("additive_animal","additive_both", "additive_xeno"), na.rm = TRUE, remove = FALSE) %>%
subset(study_ID != "4d390c76-69b1-4a62-9805-72659c3be47b") %>%
subset(study_ID != "0a879122-3ef7-4fb8-85fb-d87cd7622675")
additivesCombo_count <- additivesCombo %>% group_by(additives_all) %>% summarise(n_studies_report = length(unique(study_ID))) %>% arrange(desc(n_studies_report))
names(additivesCombo_count) <- c("Liver Additive Type", "Number of Unique Studies")
library(formattable)
formattable(additivesCombo_count,
align =c("l", "r"),
list(`Indicator Name` = formatter(
"span", style = ~ style(color = "black",font.weight = "bold")),
"Number of Unique Studies"= color_bar("#eed4f9")
))
|
Liver Additive Type
|
Number of Unique Studies
|
|
Fetal Bovine Serum (FBS)
|
54
|
|
Gelatin
|
33
|
|
Other
|
14
|
|
Collagen
|
11
|
|
Bovine Serum Albumin (BSA)
|
10
|
|
Matrigel
|
10
|
|
Basement Membrane Extracts (BME)
|
1
|
|
Not reported
|
1
|
Figure 4 - Model Conditions and Measurements
Figure 4e - Agonists
# 6.3.1
agonists <- tibble(
study_ID = reconciled$study_ID,
agonist = reconciled$`6.3.1 Please specify the agonists of the receptors that are applied._d42bd778-8656-4e6b-8b11-e4bdecb6a9b9_Answer`,
agonistsComment = reconciled$`6.3.1 Please specify the agonists of the receptors that are applied._d42bd778-8656-4e6b-8b11-e4bdecb6a9b9_Comments`
)
agonists <- separate_rows(agonists, agonist, sep="\\|")
agonists <- separate_rows(agonists, agonist, sep=";")
agonists <- separate_rows(agonists, agonistsComment, sep="\\|")
agonists <- separate_rows(agonists, agonistsComment, sep=";")
# remove line breaks
agonists$agonistsComment <- str_replace_all(agonists$agonistsComment, "[\n]" , "")
# remove whitespace from start of str
agonists$agonistsComment <- str_trim(agonists$agonistsComment, "left")
# remove whitespace from end of str
agonists$agonistsComment <- str_trim(agonists$agonistsComment, "right")
agonists_count <- agonists %>% group_by(agonist) %>% summarise(n_unique = length(unique(study_ID))) %>% arrange(desc(n_unique))
# remove NAs/None as they dont make sense
# liverMetabolite <- liverMetabolite[liverMetabolite$metabolite != "None" ,]
names(agonists_count) <- c("Agonist", "Number of Unique Studies")
#install.packages("formattable")
library(formattable)
customPurple = "#a6cee3"
formattable(agonists_count,
align =c("l", "r"),
list(`Indicator Name` = formatter(
"span", style = ~ style(color = "grey",font.weight = "bold")),
"Number of Unique Studies"= color_bar(customPurple)
))
|
Agonist
|
Number of Unique Studies
|
|
NA
|
55
|
|
Other
|
7
|
|
Pregnane X receptor (PXR)
|
1
|
table(agonists$agonistsComment)
##
## Acetaminophen Omeprazole phenobarbital rifampicin Rifampicin
## 1 2 1 1 6
# agonists$study_ID
agonists <- agonists %>%
mutate(agonistsComment = recode(agonistsComment, "rifampicin" = "Rifampicin")) %>%
mutate(agonistsComment = recode(agonistsComment, "Rifampicin " = "Rifampicin")) %>%
mutate(agonistsComment = recode(agonistsComment, "phenobarbital" = "Phenobarbital")) %>%
subset(study_ID != "0a2dc2f4-21ea-4770-bdf8-999c5be9a300")
agonists_comment_count <- agonists %>% group_by(agonistsComment) %>% summarise(n_unique = length(unique(study_ID))) %>% arrange(desc(n_unique))
# remove NAs as they dont make sense
agonists_comment_count <- agonists_comment_count %>%
drop_na(agonistsComment)
names(agonists_comment_count) <- c("Agonist", "Number of Unique Studies")
customPurple = "#a6cee3"
formattable(agonists_comment_count,
align =c("l", "r"),
list(`Indicator Name` = formatter(
"span", style = ~ style(color = "grey",font.weight = "bold")),
"Number of Unique Studies"= color_bar(customPurple)
))
|
Agonist
|
Number of Unique Studies
|
|
Rifampicin
|
7
|
|
Omeprazole
|
2
|
|
Acetaminophen
|
1
|
|
Phenobarbital
|
1
|